package com.hfkh.keyun.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.time.LocalDateTime;
@Getter
@Setter
@NoArgsConstructor
@TableName("tb_course")
public class Course implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id" ,type = IdType.AUTO) //自增
    private Integer id;//id
    @TableField("course_name")
    private String courseName;//课程名称
    @TableField("course_desc")
    private String courseDesc;//课程描述
    @TableField("course_price")
    private Double coursePrice;//课程价格
    @TableField("unit_id")
    private Integer unitId;//所属单元ID
    @TableField(exist = false)
    private Unit unit;//单元对象
    @TableField("major_id")
    private Integer majorId;//课程专业ID
    @TableField(exist = false)
    private Major major;//课程对象
    @TableField("pic_url")
    private String picUrl;//课程封面
    @TableField(exist = false)
    private MultipartFile pics;
    @TableField("visit_count")
    private Integer visitCount;//观看次数
    @TableField("course_detail")
    private String courseDetail;//课程详情
    @TableField("create_date")
    private LocalDateTime createDate;//创建时间
    @TableLogic
    private Integer deleteFlags;
}
